package com.example.sports_meet.volunteer;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.example.sports_meet.R;

import java.util.Objects;

public class VolunteerActivity extends AppCompatActivity {
    private Button signUp;
    //    报名按钮
    private Button exitRace;
    //    退赛按钮
    private Button queryResult;

    //    查询按钮
    public void init() {
        signUp = (Button) findViewById(R.id.btn_volunteerSignUp);
        exitRace = (Button) findViewById(R.id.btn_volunteerExitRace);
        queryResult = (Button) findViewById(R.id.btn_volunteerRegistrationResult);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_volunteer);
        Objects.requireNonNull(getSupportActionBar()).hide();
        init();
//        报名界面的跳转
        signUp.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                Intent intent = new Intent(VolunteerActivity.this, VolunteerSignUp.class);
                startActivity(intent);
            }
        });
//        退赛页面的跳转
        exitRace.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                Intent intent = new Intent(VolunteerActivity.this, VolunteerExitRace.class);
                startActivity(intent);
            }
        });
//        查询界面的跳转
        queryResult.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                Intent intent = new Intent(VolunteerActivity.this, VolunteerQueryResult.class);
                startActivity(intent);
            }
        });


    }
}